

const handleStr = (width: number) => {
    if (!width) {
        return '';
    }
    return `?x-image-process=image/resize,w_${width * 3},limit_0`;
};

export const handleImgUrl = (url: string, width: number) => {
    return url.replace(/^(http:)/, '') + handleStr(width);
};
